package com.hsgene.user.service.api;

import com.hsgene.common.util.result.ApiResult;
import com.hsgene.common.util.result.NullObject;
import com.hsgene.user.service.api.impl.AuthServiceImpl;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @description:
 * @projectName: hdas-geneshop-server
 * @package: com.hsgene.user.service.api
 * @author: maodi
 * @createDate: 2018/12/18 10:30
 * @version: 1.0
 * Copyright: Copyright (c) 2018
 */
@FeignClient(name = "ms-mod-authority", path = "/v1.0/genetic/testing/permission", fallback = AuthServiceImpl.class)
public interface AuthService {

    /**
     * 初始化部门权限
     *
     * @param departmentId 部门id
     * @param initType     初始化类型（init：新增初始化，clear：删除初始化）
     * @return 更新结果
     */
    @PutMapping("department/{department_id}/initialization")
    ApiResult<NullObject> initDepartmentPermission(@PathVariable("department_id") String departmentId,
                                                   @RequestParam(name = "initType", defaultValue = "init") String
                                                           initType);

}
